<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use DB;

class doSuccessbController extends Controller
{
    //
    public function index(Request $request)
    {    	
    	$list = session('list');  
    	// dd($list);       
    	for ($i=0; $i < count($list) ; $i++) {             
    	 	$data = DB::table('order')->where('id',$list[$i]->id)->update(['state' => 2]);           
    	}
    	return view('home.success', ['money' => $_GET['money']]);    	
    }
}